<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>老师页面</title>
    <link rel="stylesheet" type="text/css" href="../js/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../js/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../js/easyui/demo/demo.css">
    <script type="text/javascript" src="../js/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../js/easyui/wangEditor.js"></script>
    <script type="text/javascript" src="../js/teacher/teacher.js"></script>
    <style type="text/css">
        textarea {
            height: 40px;
            width: 500px;
        }
    </style>
    <style type="text/css">
        .textarea1 {
            height: 30px;
            width: 400px;
        }
    </style>
</head>

<body class="easyui-layout">

<div data-options="region:'center'">
    <div class="easyui-layout" data-options="fit:true">

        <div data-options="region:'west'" style="width:180px; ">
            <div id="accordionid" class="easyui-accordion" style="width: 100%;">
                <div title="试题录入" style="overflow:auto;padding:10px;">
                    <a onclick="showinput()" class="easyui-linkbutton" style="width: 100%;">手动输入</a>
                    <a onclick="show_in_doc()" class="easyui-linkbutton" style="width: 100%;">docx导入</a>
                    <a onclick="show_in_txt()" class="easyui-linkbutton" style="width: 100%;">txt导入</a>
                </div>
                <div title="试题管理" style="overflow:auto;padding:10px;">

                    <a onclick="deptMag()" class="easyui-linkbutton" style="width: 100%;">选择题管理</a>
                    <a onclick="FAndTFMag()" class="easyui-linkbutton" style="width: 100%;">填空题/判断题管理</a>
                    <a onclick="subMag()" class="easyui-linkbutton" style="width: 100%;">主观题管理</a>
                </div>
                <div title="课程管理" style="overflow:auto;padding:10px;">

                    <a onclick="course()" class="easyui-linkbutton" style="width: 100%;">课程管理</a>

                </div>
                <div title="个人管理" style="overflow:auto;padding:10px;">

                    <a onclick="updatepwd()" class="easyui-linkbutton" style="width: 100%;">修改密码</a>

                </div>

                <div title="" selected style="padding:10px;"></div>
            </div>

        </div>
        <div data-options="region:'center'">

            <div id="inputbyUser">
                <div id="tt" class="easyui-tabs">
                    <div title="选择题" style="padding:20px;">
                        <div class="widget">

                            <div class="widget-content">
                                <form method="post" id="submitSelect" action="teacher/inputmul">
                                    <div id="foreach" style="font-size: 12px;">

                                        <div>

                                            <h4>题目：</h4>
                                            <textarea class="textarea" name="t1" id="inputtrarea" placeholder="题目输入不能为空"style="vertical-align: top;"></textarea>  难度等级:
                                            <select  class="easyui-combobox" name="nddj" style="width:100px;" value="">
                                                <option></option>
                                                <option value="高">高</option>
                                                <option value="中">中</option>
                                                <option value="低">低</option>
                                            </select>
                                            <div>
                                                <h4>选项</h4> A
                                                <textarea class="textarea1" name="a"></textarea>
                                                <br /> B
                                                <textarea class="textarea1" name="b"></textarea>
                                                <br /> C
                                                <textarea class="textarea1" name="c"></textarea>
                                                <br /> D
                                                <textarea class="textarea1" name="d"></textarea>
                                                <br /> E
                                                <textarea class="textarea1" name="e"></textarea>
                                                <br /> F
                                                <textarea class="textarea1" name="f"></textarea>
                                                <br />

                                            </div>

                                        </div>
                                    </div>
                                </form>
                            </div>

                            <a id="list" onclick="addmul()">
                                <div class="easyui-linkbutton">添加试题</div>
                            </a>

                            <a onclick="doSubmit()" style="padding-left: 100px;">
                                <div class="easyui-linkbutton">出题完成</div>
                            </a>

                        </div>
                    </div>
                    <div title="非选择题" style="overflow:auto;padding:20px;">
                        <div>
                       <table>
                           <tr >
                               <td>
                                   题目类型:<select  id="typexx" class="easyui-combobox"style="width:96px;">
                                   <option value=""></option>
                                   <option value="填空题">填空题</option>
                                   <option value="判断题">判断题</option>
                                   <option value="简答题">简答题</option>
                               </select>
                               </td>
                               <td>
                                   难度:<select id="add_othernd" class="easyui-combobox"style="width:56px;">
                                   <option value=""></option>
                                   <option value="低">低</option>
                                   <option value="中">中</option>
                                   <option value="高">高</option>
                               </select>
                               </td>

                               <td><button id="btn_add"  class="easyui-linkbutton" iconCls="icon-save" >保存</button></td>
                           </tr>
                       </table>
                        </div>

                        <div>

                            <div id="editor">

                            </div>



                            <script type="text/javascript">
                                var E = window.wangEditor
                                var editor = new E('#editor')
                                // 或者 var editor = new E( document.getElementById('editor') )
                                editor.customConfig.menus = [
                                    'head',
                                    'bold',
                                    'list',
                                    'justify',
                                ];
                                editor.create();
                                document.getElementById('btn_add').addEventListener('click', function () {
                                    var name=$("#typexx").combobox('getValue')==null?"":$("#typexx").combobox('getValue');
                                    if (name==""||name==null) {
                                        alert("请填写题目类型");
                                        return;
                                    }
                                    save_subquestion(editor.txt.text(),name);
                                }, false)
                            </script>
                        </div>
                    </div>

                </div>
            </div>

            <div id="showmul">
                <div id="tt2" class="easyui-tabs">
                    <div title="选择题" style="padding:20px;">
                        <!--
                            头
                            作者：wcc
                            时间：2019-02-18
                            描述：
                        -->
                        <div>
                            <table>
                                <tr>
                                    <td width="196px">
                                      题目难度：<select id="mul_nd" type="text" class="easyui-combobox" style="width:126px;">
                                            <option value=""></option>
                                            <option value="高"> 高</option>
                                            <option value="中"> 中</option>
                                            <option value="低"> 低</option>
                                        </select>
                                    </td>
                                    <td width="196px">
                                        所属学院：<select id="mul_col" type="text" class="easyui-combobox" style="width:126px;"/>
                                    </td>
                                    <td width="196px">
                                        所属专业：<select id="mul_dept" type="text" class="easyui-combobox" style="width:126px;" />
                                    </td>
                                    <td width="196px">
                                        所属课程：<select id="mul_couser" type="text" class="easyui-combobox" style="width:126px;"/>
                                    </td>

                                    <td width="196px">
                                        <a onclick="findmul()" class="easyui-linkbutton">查询</a>
                                        <a onclick="delmul()" class="easyui-linkbutton">删除</a>
                                    </td>
                                </tr>
                            </table>

                        </div>
                        <!--
                            表
                            作者：wcc
                            时间：2019-02-18
                            描述：
                        -->
                        <div class="datagridbody" id="teachermul" style="margin-top: 25px;">
                            <table id="teachermulbox" style="font-size: 14px;"></table>
                        </div>
                    </div>
                </div>
            </div>


            <div id="FAndTF">
                <div id="tt3" class="easyui-tabs">
                    <div title="填空/判断题" style="padding:20px;">
                        <!--
                            头
                            作者：wcc
                            时间：2019-02-18
                            描述：
                        -->
                        <div>
                            <table>
                                <tr>
                                    <td width="196px">
                                        题目难度：<select id="tf_nd" type="text" class="easyui-combobox" style="width:126px;">
                                        <option value=""></option>
                                        <option value="高"> 高</option>
                                        <option value="中"> 中</option>
                                        <option value="低"> 低</option>
                                    </select>
                                    </td>
                                    <td width="196px">
                                        题目类型：<select id="tf_lx" type="text" class="easyui-combobox" style="width:126px;">
                                        <option value=""></option>
                                        <option value="填空题"> 填空题</option>
                                        <option value="判断题"> 判断题</option>

                                    </select>
                                    </td>
                                    <td width="196px">
                                        所属学院：<select id="ft_col" type="text" class="easyui-combobox" style="width:126px;"/>
                                    </td>
                                    <td width="196px">
                                        所属专业：<select id="ft_dept" type="text" class="easyui-combobox" style="width:126px;" />
                                    </td>
                                    <td width="196px">
                                        所属课程：<select id="ft_couser" type="text" class="easyui-combobox" style="width:126px;"/>
                                    </td>
                                    <td width="196px">
                                        <a onclick="findFAndTF()" class="easyui-linkbutton">查询</a>
                                        <a onclick="delFAndTF()" class="easyui-linkbutton">删除</a>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <!--
                            表
                            作者：wcc
                            时间：2019-02-18
                            描述：
                        -->
                        <div class="datagridbody" id="teacherFAndTF" style="margin-top: 25px;">
                            <table id="FAndTFbox" style="font-size: 14px;"></table>
                        </div>
                    </div>
                </div>
            </div>

            <div id="sub">
                <div id="tt4" class="easyui-tabs">
                    <div title="主观题" style="padding:20px;">

                        <!--
                            头
                            作者：wcc
                            时间：2019-02-18
                            描述：
                        -->
                        <div>

                            <table>
                                <tr>
                                    <td width="196px">
                                        题目难度：<select id="ans_nd" type="text" class="easyui-combobox" style="width:126px;">
                                        <option value=""></option>
                                        <option value="高"> 高</option>
                                        <option value="中"> 中</option>
                                        <option value="低"> 低</option>
                                    </select>
                                    </td>

                                    <td width="196px">
                                        所属学院：<select id="ans_col" type="text" class="easyui-combobox" style="width:126px;"/>
                                    </td>
                                    <td width="196px">
                                        所属专业：<select id="ans_dept" type="text" class="easyui-combobox" style="width:126px;" />
                                    </td>
                                    <td width="196px">
                                        所属课程：<select id="ans_couser" type="text" class="easyui-combobox" style="width:126px;"/>
                                    </td>
                                    <td width="196px">
                                        <a onclick="findsub()" class="easyui-linkbutton">查询</a>
                                        <a onclick="delANS()" class="easyui-linkbutton">删除</a>
                                    </td>
                                </tr>
                            </table>

                        </div>
                        <!--
                            表
                            作者：wcc
                            时间：2019-02-18
                            描述：
                        -->
                        <div class="datagridbody" id="teachersub" style="margin-top: 25px;">
                            <table id="subbox" style="font-size: 14px;"></table>
                        </div>
                    </div>
                </div>
            </div>

            <div id="couserDiv">
                <div id="t3" class="easyui-tabs">
                    <div title="课程操作" style="padding:20px;">
                        <div>
                            <table width="1000px">
                                <tr height="20px"></tr>
                                <tr>
                                    <td width="50px"></td>
                                    <td><a onclick="showaddCouser()" class="easyui-linkbutton">增加课程</a>
                                        <a onclick="showeditCouser()" class="easyui-linkbutton">修改课程</a>
                                        <a onclick="delCouser()" class="easyui-linkbutton">删除课程</a>
                                    </td>
                                </tr>
                            </table>
                        </div>

                        <div class="datagridbody" id="teacherCouser" style="margin-top: 25px;">
                            <table id="teacherCouserbox" style="font-size: 14px;"></table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        < </div>
    <div data-options="region:'south'" style="height:30px; ">

    </div>


   <!--添加课程的弹窗-->
    <div id="addCouser" closed="true" class="easyui-window" title="课程" style="width: 800px; height: 200px; "data-options="modal:true">

        <table width="700px">
            <tr height="20px"></tr>
            <tr>
                <td width="50px"></td>
                <td>课程名称：</td><td><input id="addCousername" />
                </td>
                <td>所属专业：</td><td><input id="addCouserdept" type="text" class="easyui-combobox" required="required"/>
            </td>
            </tr>

        </table>
        <table style="margin-top: 25px;margin-left: 55px;font-size: 12px;text-align: center;">
            <tr>
                <td width="300px"></td>
                <td><input  type="button" class="btn-primary" style="background-color: #0088CC; color: white;" onclick="Couser_add_save()" value="保存" /></td>
                <td width="15px"></td>
                <td><input  type="button" class="btn-primary" style="background-color: #0088CC; color: white;" onclick="gb('addCouser')" value="关闭" /></td>
            </tr>
        </table>

    </div>


    <!--修改课程的弹窗-->
    <div id="editCouser" closed="true" class="easyui-window" title="课程" style="width: 800px; height: 200px; "data-options="modal:true">
            <input id="edit_CouserID" hidden="hidden">
        <table width="700px">
            <tr height="20px"></tr>
            <tr>
                <td width="50px"></td>
                <td>课程名称：</td><td><input id="editCousername" />
            </td>
                <td>所属专业：</td><td><input id="editCouserdept" type="text" class="easyui-combobox" required="required"/>
            </td>
            </tr>

        </table>
        <table style="margin-top: 25px;margin-left: 55px;font-size: 12px;text-align: center;">
            <tr>
                <td width="300px"></td>
                <td><input  type="button" class="btn-primary" style="background-color: #0088CC; color: white;" onclick="Couser_edit_save()" value="保存" /></td>
                <td width="15px"></td>
                <td><input  type="button" class="btn-primary" style="background-color: #0088CC; color: white;" onclick="gb('editCouser')" value="关闭" /></td>
            </tr>
        </table>

    </div>
</div>

    <!--描述：选择题详情的弹窗-->
    <div id="detailsmul" closed="true" class="easyui-window" title="选择题" style="width: 800px; height: 600px; "data-options="modal:true">
        <!--
            作者：wcc
            时间：2019-02-18
            描述：选择题的显示
        -->
        <div id="themultitle" style="margin-top: 25px;margin-left: 25px; font-size: x-large;">

            <div id="spantitle"></div>
        </div>
        <div id="chsa" style="margin-top: 25px;margin-left: 45px;font-size:large;display: none;">
            A.<div ID="spana"></div>
        </div>
        <div id="chsb" style="margin-top: 25px;margin-left: 45px;font-size:large;display: none;">
            B.<div ID="spanb"></div>
        </div>
        <div id="chsc" style="margin-top: 25px;margin-left: 45px;font-size:large;display: none;">
            C.<div ID="spanc"></div>
        </div>
        <div id="chsd" style="margin-top: 25px;margin-left: 45px;font-size:large;display: none;">
            D.<div ID="spand"></div>
        </div>
        <div id="chse" style="margin-top: 25px;margin-left: 45px;font-size:large;display: none;">
            E.<div ID="spane"></div>
        </div>
        <div id="chsf" style="margin-top: 25px;margin-left: 45px;font-size:large;display: none;">
            F.<div ID="spanf"></div>
        </div>

    </div>

    <!---修改选择题--->
    <div id="detailsmul_edit" closed="true" class="easyui-window" title="选择题" style="width: 800px; height: 600px; "data-options="modal:true">

        <div id="themultitle_edit" style="margin-top: 25px;margin-left: 25px; font-size: x-large;">
                <input id="update_mul_id" hidden="hidden">
            标题:<textarea id="spantitle_edit" style="vertical-align: top;"></textarea>   <div style="color: #00a157">答案</div>  <SELECT id="mul_ans_edit" class="easyui-combobox"  data-options=" multiple:true" style="width:100px;">
                                                                                                            <option></option>
                                                                                                            <option value="A">A</option>  <option value="B">B</option>  <option value="C">C</option>
                                                                                                             <option value="D">D</option>  <option value="E">E</option>  <option value="F">F</option>
                                                                                                          </SELECT>
        </div>

        <form id="form_mul_des">
        <div id="chsa_edit" style="margin-top: 25px;margin-left: 65px;font-size:large;display: none;">
                   A.<textarea ID="spana_edit"style="vertical-align: top;"></textarea>
        </div>
        <div id="chsb_edit" style="margin-top: 25px;margin-left: 65px;font-size:large;display: none;">
                   B.<textarea ID="spanb_edit"style="vertical-align: top;"></textarea>
        </div>
        <div id="chsc_edit" style="margin-top: 25px;margin-left: 65px;font-size:large;display: none;">
                   C.<textarea ID="spanc_edit"style="vertical-align: top;"></textarea>
        </div>
        <div id="chsd_edit" style="margin-top: 25px;margin-left: 65px;font-size:large;display: none;">
                   D.<textarea ID="spand_edit"style="vertical-align: top;"></textarea>
        </div>
        <div id="chse_edit" style="margin-top: 25px;margin-left: 65px;font-size:large;display: none;">
                   E.<textarea ID="spane_edit"style="vertical-align: top;"></textarea>
        </div>
        <div id="chsf_edit" style="margin-top: 25px;margin-left: 65px;font-size:large;display: none;">
                   F.<textarea ID="spanf_edit"style="vertical-align: top;"></textarea>

        </div>
        </form>
        <div style="background-color: #00E466 ;width: 100%;height: 1px"></div>
                 <table style="margin:auto;width:690px; margin-top : 25px;">
                    <tr>


                        <td>
                            学院:<input id="mul_col_edit" class="easyui-combobox" style="width:150px;">
                        </td>

                        <td>
                            专业:<input id="mul_edpt_edit" class="easyui-combobox"style="width:150px;">
                        </td>

                        <td>
                            课程:<input id="mul_couser_edit" class="easyui-combobox"style="width:150px;">
                        </td>

                    </tr>
                    <tr height="40px"></tr>
                     <tr>
                         <td>
                             难度等级:
                             <select id="nddj_edit" class="easyui-combobox"  style="width:100px;" value="">
                                 <option></option>
                                 <option value="高">高</option>
                                 <option value="中">中</option>
                                 <option value="低">低</option>
                             </select>
                         </td>

                         <td>描述:<textarea id="mul_edit_des" style="width:150px;vertical-align: top;"></textarea></td>

                         <td> <a class="easyui-linkbutton" onclick="save_edit_mul_des()"> 保存</a></td>
                     </tr>
                 </table>
        </div>


<!---修改填空判断题--->
<div id="detailstandtf_edit" closed="true" class="easyui-window" title="填空/判断" style="width: 800px; height: 600px; "data-options="modal:true">

    <div id="thetandtftitle_edit" style="margin-top: 25px;margin-left: 25px; font-size: x-large;">
        <input id="update_tandtf_id" hidden="hidden">
        题目:<textarea id="spantitle_fantf_edit" style="vertical-align: top;"></textarea>

        <br>
       答案： <input id ="fandtf_deit_ans">
    </div>

    <div style="background-color: #00E466 ;width: 100%;height: 1px"></div>
    <table style="margin:auto;width:690px; margin-top : 25px;">
        <tr>


            <td>
                学院:<input id="tandtf_col_edit" class="easyui-combobox" style="width:150px;">
            </td>

            <td>
                专业:<input id="tandtf_edpt_edit" class="easyui-combobox"style="width:150px;">
            </td>

            <td>
                课程:<input id="tandtf_couser_edit" class="easyui-combobox"style="width:150px;">
            </td>

        </tr>
        <tr height="40px"></tr>
        <tr>
            <td>
                难度等级:
                <select id="nddj_fandtf_edit" class="easyui-combobox"  style="width:100px;" value="">
                    <option></option>
                    <option value="高">高</option>
                    <option value="中">中</option>
                    <option value="低">低</option>
                </select>
            </td>

            <td>描述:<textarea id="tandtf_edit_des" style="width:150px;vertical-align: top;"></textarea></td>

            <td> <a class="easyui-linkbutton" onclick="save_edit_tandtf_des()"> 保存</a></td>
        </tr>
    </table>
</div>

<!--描述：判断填空详情的弹窗-->
<div id="detailtf" closed="true" class="easyui-window" title="填空/判断" style="width: 800px; height: 600px; "data-options="modal:true">

    <div id="thetftitle" style="margin-top: 25px;margin-left: 25px; font-size: x-large;">

        <div id="spantftitle"></div>
    </div>
</div>

<!---修改简答题--->
<div id="detailsans_edit" closed="true" class="easyui-window" title="简答题" style="width: 800px; height: 600px; "data-options="modal:true">

    <div id="thetandanstitle_edit" style="margin-top: 25px;margin-left: 25px; font-size: x-large;">
        <input id="update_tandans_id" hidden="hidden">
        题目:<textarea id="spantitle_fanans_edit" style="vertical-align: top; height: 200px"></textarea>

        <br>
        答案：<input id ="fandans_edit_ans">
    </div>

    <div style="background-color: #00E466 ;width: 100%;height: 1px"></div>
    <table style="margin:auto;width:690px; margin-top : 25px;">
        <tr>


            <td>
                学院:<input id="tandans_col_edit" class="easyui-combobox" style="width:150px;">
            </td>

            <td>
                专业:<input id="tandans_edpt_edit" class="easyui-combobox"style="width:150px;">
            </td>

            <td>
                课程:<input id="tandans_couser_edit" class="easyui-combobox"style="width:150px;">
            </td>

        </tr>
        <tr height="40px"></tr>
        <tr>
            <td>
                难度等级:
                <select id="nddj_fandans_edit" class="easyui-combobox"  style="width:100px;" value="">
                    <option></option>
                    <option value="高">高</option>
                    <option value="中">中</option>
                    <option value="低">低</option>
                </select>
            </td>

            <td>描述:<textarea id="tandans_edit_des" style="width:150px;vertical-align: top;"></textarea></td>

            <td> <a class="easyui-linkbutton" onclick="save_edit_tandans_des()"> 保存</a></td>
        </tr>
    </table>
</div>

<!--描述：简答题的弹窗-->
<div id="detailans" closed="true" class="easyui-window" title="简答题" style="width: 800px; height: 600px; "data-options="modal:true">

    <div id="thesns" style="margin-top: 25px;margin-left: 25px; font-size: x-large;">

        <div id="spananstitle"></div>
    </div>
</div>


<!--描述：简答题的弹窗-->
<div id="updatepwd" closed="true" class="easyui-window" title="修改密码" style="width: 400px; height: 200px; "data-options="modal:true">

        <table>
            <tr>
                <td>　　账号：<input id="userid" width="100px"></td>
            </tr>
            <tr>
                <td>原始密码：<input id="oldpwd" width="100px"></td>
            </tr>
            <tr>
                <td>　新密码：<input id="newpwd" width="100px"></td>
            </tr>
            <tr>
                <td>　新密码：<input id="newpwd2" width="100px"></td>
            </tr>
            <tr>
                <td> <a class="easyui-linkbutton" onclick="save_pwd()"> 保存</a></td>
                <td> <a class="easyui-linkbutton" onclick=" gb('updatepwd')">取消</a></td>
            </tr>
        </table>
</div>
</body>

</html>